package haoyou.csnf.manager.module.pm.dal.mysql.professionaltitle;

import java.util.*;

import haoyou.csnf.manager.framework.common.pojo.PageResult;
import haoyou.csnf.manager.framework.mybatis.core.query.LambdaQueryWrapperX;
import haoyou.csnf.manager.framework.mybatis.core.mapper.BaseMapperX;
import haoyou.csnf.manager.module.pm.dal.dataobject.professionaltitle.ProfessionalTitleDO;
import org.apache.ibatis.annotations.Mapper;
import haoyou.csnf.manager.module.pm.controller.admin.professionaltitle.vo.*;

/**
 * 系统职称 Mapper
 *
 * @author 好有经验源码
 */
@Mapper
public interface ProfessionalTitleMapper extends BaseMapperX<ProfessionalTitleDO> {

    default PageResult<ProfessionalTitleDO> selectPage(ProfessionalTitlePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ProfessionalTitleDO>()
                .likeIfPresent(ProfessionalTitleDO::getTieName, reqVO.getTieName())
                .eqIfPresent(ProfessionalTitleDO::getTieLevel, reqVO.getTieLevel())
                .eqIfPresent(ProfessionalTitleDO::getTieType, reqVO.getTieType())
                .orderByDesc(ProfessionalTitleDO::getId));
    }

}